package edu.calvin.djs32.cs214.interpreters.calculator.primitives;

import static org.junit.Assert.assertEquals;

import org.junit.Test;

import edu.calvin.cs214.hobbes2008.IntegerTIR;


public class SquarePrimitiveTest {
	@Test
	public void shouldApplySquare() {
	  assertEquals(new IntegerTIR(9), new SquarePrimitive().apply(null, new IntegerTIR(3)));
	  assertEquals(new IntegerTIR(49), new SquarePrimitive().apply(null, new IntegerTIR(7)));
	  assertEquals(new IntegerTIR(9), new SquarePrimitive().apply(null, new IntegerTIR(-3)));
	}

}
